Skip to content

Enable multi-process DataLoader for dreambooth - #950

Merged
patil-suraj merged 1 commit into
huggingface:mainfrom
skirsten:dreambooth-dataloader-multi-process
Oct 26, 2022
Merged

Enable multi-process DataLoader for dreambooth#950
patil-suraj merged 1 commit into
huggingface:mainfrom
skirsten:dreambooth-dataloader-multi-process

Conversation

@skirsten

@skirsten skirsten commented Oct 22, 2022

Copy link
Copy Markdown
Contributor

This simple change enables the DataLoader to prefetch the next data async. More info in the docs.

This resulted in a 35% speedup for me and utilizes the GPU power better (as the data loading is not blocking the GPU):

image
(green = new, blue = old)

The same can probably also be applied to all the other DataLoaders but I do not have the time to test them.

@HuggingFaceDocBuilderDev

HuggingFaceDocBuilderDev commented Oct 22, 2022

Copy link
Copy Markdown

The documentation is not available anymore as the PR was closed or merged.

@patrickvonplaten

Copy link
Copy Markdown
Contributor

This makes sense to me! @patil-suraj mind taking a look here?

@patil-suraj patil-suraj left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot @skirsten , lgtm!

@patil-suraj
patil-suraj merged commit 8332c1a into huggingface:main Oct 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants